
import qs from 'qs'
const parseParams = (search)=>{
  if(!search){
    return null;
  }
  if(search.indexOf('?') !== -1){
    let params = search.split('?')[1];
    return qs.parse(params)
  }else{
    return qs.parse(search)
  }
  
}

const limitNum = (str, n=10)=>str.substr(0,n)+'...'


export {
	limitNum,
  parseParams
}